[body]
  <link href="/css/registration.css" rel="stylesheet" type="text/css">
  <!--link rel="stylesheet" href="/css/iphone_chb_style.css"-->
  <!--script src="/js/iphone-style-checkboxes.js"></script-->
  <script>
    $(document).ready(function(){
			$('#reg_email').change(function(){
			  if( ($(this).val()+'').search('@')<0 ){
			    $('#reg_email').siblings('span').html('<span class="err_err">E-mail not valid</span>');
					$('#reg_email').unbind('keydown').keydown(function(){
		        $('#reg_email').siblings('span').html('');
					});
			    return ;
				}

				var req = new JsHttpRequest();
				req.onreadystatechange = function() {
					if (req.readyState == 4) {
						if(req.responseJS) {
							if(req.responseJS.content=='exists'){
								$('#reg_email').siblings('span').html('<span class="err_err">User with this e-mail exists. <a href="#" onclick="make_otp(); return false;">Login&nbsp;with&nbsp;email?</a></span>');
								$('#reg_email').unbind('keydown').keydown(function(){
					        $('#reg_email').siblings('span').html('');
								});
								$('#reg_email').unbind('blur').blur(function(){
					        $('#reg_email').change();
								});
							}
						}
						if(req.responseText!='') alert(req.responseText);
					}
				}
			  req.open(null, '/ajax/', true);
			  req.send( { mode: 'check_email','email':$('#reg_email').val() } );

			});
			
			//$('.on_off :checkbox').iphoneStyle({ checkedLabel: 'YES', uncheckedLabel: 'NO' });
			if(soc_reg){
			  apply_soc_reg(soc_reg);
			}
			
			$('.err_err').parent().prev('input').keydown(function(){
			  $(this).next('span:first').children('.err_err').remove();
			});
		});
		function make_otp(){
			var req = new JsHttpRequest();
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					if(req.responseJS) {
						if(req.responseJS.content.substr(0, 6)=='error:'){
							alert( req.responseJS.content.substr(6) );
						}else{
						  alert( 'One-time password set' );
						}
					}
					if(req.responseText!='') alert(req.responseText);
				}
			}
			
			var t=location.search.slice(1).split('&');
			var plan=false;
			for( var i in t ){
				var tt=t[i].split('=');
				if(tt[0]=='plan'){plan=tt[1]; break;}
			}
			
		  req.open(null, '/ajax/', true);
		  req.send( { mode: 'email_login','email':$('#reg_email').val(),'plan':plan } );
		}
		function uloginCallback(token){
 			make_request(
				{
				  'mode':'ulogin_token',
				  'data':{
				    'token':token
					}
				},
 			  function(req){
 			    if(req.responseJS.user) apply_soc_reg(req.responseJS.user);
				}
			);
		  
		}
		
		function apply_soc_reg(data){
		  if( data.email && data.email!='' ){
					$('.pwd_block').hide();
					$('.email_block input').remove();
					$('.email_block label').after('<span class="inp">'+data.email+'</span>');
			}

			if( data.last_name && data.last_name!='' ){
					$('.name_block input').remove();
					$('.name_block label').after('<span class="inp">'+
						data.first_name+' '+data.last_name+
						'</span>');
			}

			if(data.bdate && data.bdate!=''){
					$('.bdate_block input').remove();
					$('.bdate_block label').after('<span class="inp">'+data.bdate+'</span>');
			}

			if(data.sex){
					$('.gender_block>div:first').html('<span class="inp">'+
					( (data.sex=='m')?'Male':'Female' )+
					'</span>');
			}
			if(data.photo_big && data.photo_big!=''){
					$('.photo_block .picture').html('<img src="'+ data.photo_big +'">');
			}
			$('.err_err').each(function(){
			  if( $(this).parent().siblings('input').get().length<1 ) $(this).hide();
			});
		}
		var soc_reg='{soc_reg_info}';
		if(soc_reg!='')soc_reg=JSON.parse(soc_reg);
  </script>
	<form id="registration_form" class="typical" >
		<div id="join_nav" style="width:600px; margin:0 auto;">
			<h3>
				<a href="/join" class="light_gray"><small><i class="bubble light_gray">1</i> Select your package </small></a>
				<span><i class="bubble orange">2</i> Fill-up personal information </span>
				<small><i class="bubble black">3</i> You are a member!</small>
			</h3>
		</div>
	
			{error:error}

		<div>{pack_choice}</div>
			
		<div class="cols" id="reg_man_block">
			<div class="col c50">
			  <h3>Profile <span>information</span></h3>
			  
			  <div class="field f3">
					<label style="float:left; padding-top:0;">Use social network:</label>
					
					<div id="uLogin1" data-uloginid="b605718b"></div>
					
					<div class="clear"></div>
				</div>
			
			  <div class="field f3 email_block">
					<label>E-mail*:</label>
					<input type="text" name="u_email" tabindex="2" stype="email" required placeholder="Used for sign in" id="reg_email" autocomplete="off">
					<span><!--err:u_email--></span>
					<div class="clear"></div>
				</div>
				
				<div class="field f3 pwd_block">
					<label>Password*:</label>
					<input type="password" name="u_pwd" tabindex="4" required placeholder="At least 6 characters"  autocomplete="off">
					<span>
						<!--err:u_pwd-->
					</span>
					<div class="clear"></div>
				</div>
				<div class="field f3 pwd_block">
					<label>Password confirm*:</label>
					<input type="password" name="conf" tabindex="4" required placeholder="Confirm password">
					<span></span>
					<div class="clear"></div>
				</div>


				<div class="field f3 name_block">
					<label>Your name*:</label>
					<input type="text" name="u_name" id="u_name" required tabindex="6" placeholder="Type your full name">
					<span><!--err:u_name--></span>
					<div class="clear"></div>
				</div>
				<script>
					document.getElementById("reg_email").focus();
				</script>

				<div class="field f3 bdate_block">
					<label>Date of birth*:</label>
					<input type="text" name="u_bdate" required tabindex="14" stype="date" placeholder="dd.mm.YYYY">
					<span><!--err:u_bdate--></span>
					<div class="clear"></div>
				</div>

			  <div class="field f3 mobile_block">
					<label>Mobile*:</label>
					<input type="text" name="u_mobile" tabindex="16" stype="phone" required>
					<span><!--err:u_mobile--></span>
					<div class="clear"></div>
				</div>

			  <div class="field f3 phone_block">
					<label>Office:</label>
					<input type="text" name="u_wphone" tabindex="18" stype="phone">
					<span><!--err:u_wphone--></span>
					<div class="clear"></div>
				</div>
				<div class="field f3 gender_block" >
					<label style="float:left;">Gender*:</label>
					<div style="width:146px; float:left;">
						<input id="u_gender_male" class="short" type="radio" name="u_gender" value="m" required checked tabindex="10">
						<label for="u_gender_male">male</label><br>
						<input id="u_gender_female" class="short" type="radio" name="u_gender" value="f" tabindex="12">
						<label for="u_gender_female">female</label>
					</div>
					<span><!--err:u_gender--></span>
					<div class="clear"></div>
				</div>


				<div class="field f3 photo_block">
					<label>Photo:</label>
					<div style="width:100px; height:100px;" class="picture">
					  <img src="/img/profile_def.jpg" >
					  <input type="file" name="ill">
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div class="col c50">
<!--Anketa:begin-->
			<h3><small>Fill please</small> <span>Exercise Readiness Questionnaire</span> (ERQ)</h3>
			<div class="qf">
			  
			  <div>
					<input type="radio" name="erq1" id="erq1_yes" tabindex="20" value="yes" required>	<label class="inline" for="erq1_yes">YES</label>
				</div>
				<div>
					<input type="radio" name="erq1" id="erq1_no" tabindex="22" value="no" checked>  					<label class="inline" for="erq1_no">NO</label>
				</div>
			
				Has a physician ever diagnosed you with a heart condition and indicated you should restrict your physical activity?
				
				<div class="clear"></div>
				<span><!--err:erq1--></span>
			</div>

			<div class="qf">
			  <div>
					<input type="radio" name="erq2" id="erq2_yes" tabindex="24" value="yes" required>	<label class="inline" for="erq2_yes">YES</label>
				</div>
				<div>
					<input type="radio" name="erq2" id="erq2_no" tabindex="26" value="no" checked>  					<label class="inline" for="erq2_no">NO</label>
				</div>
				<div>
				 When you perform physical activity, do you feel pain in your chest?
				</div>
				<div class="clear"></div>
				<span><!--err:erq2--></span>
			</div>


			<div class="qf">
			  <div>
					<input type="radio" name="erq3" id="erq3_yes" tabindex="28" value="yes" required>	<label class="inline" for="erq3_yes">YES</label>
				</div>
				<div>
					<input type="radio" name="erq3" id="erq3_no" tabindex="30" value="no" checked>  					<label class="inline" for="erq3_no">NO</label>
				</div>
				<div>
				 When you were not engaging in physical activity, have you experienced chest pain in the past month?
				</div>
				<div class="clear"></div>
				<span><!--err:erq3--></span>
			</div>
			<div class="qf">
			  <div>
					<input type="radio" name="erq4" id="erq4_yes" tabindex="32" value="yes" required>	<label class="inline" for="erq4_yes">YES</label>
				</div>
				<div>
					<input type="radio" name="erq4" id="erq4_no" tabindex="34" value="no" checked>  					<label class="inline" for="erq4_no">NO</label>
				</div>
				<div>
				 Do you ever faint or get dizzy and lose your balance?
				</div>
				<div class="clear"></div>
				<span><!--err:erq4--></span>
			</div>
<div class="qf">
			  <div>
					<input type="radio" name="erq5" id="erq5_yes" tabindex="36" value="yes" required>	<label class="inline" for="erq5_yes">YES</label>
				</div>
				<div>
					<input type="radio" name="erq5" id="erq5_no" tabindex="38" value="no" checked>  					<label class="inline" for="erq5_no">NO</label>
				</div>
				<div>
				 Do you have an injury or orthopedic condition (such as a back, hip, or knee problem) that may worsen due to a change in your physical activity?
				</div>
				<div class="clear"></div>
				<span><!--err:erq5--></span>
			</div>
<div class="qf">
			  <div>
					<input type="radio" name="erq6" id="erq6_yes" tabindex="40" value="yes" required>	<label class="inline" for="erq6_yes">YES</label>
				</div>
				<div>
					<input type="radio" name="erq6" id="erq6_no" tabindex="42" value="no" checked>  					<label class="inline" for="erq6_no">NO</label>
				</div>
				<div>
				 Do you have high blood pressure or a heart condition in which a physician is currently prescribing a medication?
				</div>
				<div class="clear"></div>
				<span><!--err:erq6--></span>
			</div>
<div class="qf">
			  <div>
					<input type="radio" name="erq7" id="erq7_yes" tabindex="44" value="yes" required>	<label class="inline" for="erq7_yes">YES</label>
				</div>
				<div>
					<input type="radio" name="erq7" id="erq7_no" tabindex="46" value="no" checked>  					<label class="inline" for="erq7_no">NO</label>
				</div>
				<div>
				 Are you pregnant?
				</div>
				<div class="clear"></div>
				<span><!--err:erq7--></span>
			</div>
<div class="qf">
			  <div>
					<input type="radio" name="erq8" id="erq8_yes" tabindex="48" value="yes" required>	<label class="inline" for="erq8_yes">YES</label>
				</div>
				<div>
					<input type="radio" name="erq8" id="erq8_no" tabindex="50" value="no" checked>  					<label class="inline" for="erq8_no">NO</label>
				</div>
				<div>
				 Do you have insulin dependent diabetes?
				</div>
				<div class="clear"></div>
				<span><!--err:erq8--></span>
			</div>
<div class="qf">
			  <div>
					<input type="radio" name="erq9" id="erq9_yes" tabindex="52" value="yes" required>	<label class="inline" for="erq9_yes">YES</label>
				</div>
				<div>
					<input type="radio" name="erq9" id="erq9_no" tabindex="54" value="no" checked>  					<label class="inline" for="erq9_no">NO</label>
				</div>
				<div>
				 Are you 69 years of age or older and not used to being very active?
				</div>
				<div class="clear"></div>
				<span><!--err:erq9--></span>
			</div>
<div class="qf">
			  <div>
					<input type="radio" name="erq10" id="erq10_yes" tabindex="56" value="yes" required>	<label class="inline" for="erq10_yes">YES</label>
				</div>
				<div>
					<input type="radio" name="erq10" id="erq10_no" tabindex="58" value="no" checked>  					<label class="inline" for="erq10_no">NO</label>
				</div>
				<div>
				 Do you know of any other reason you should not exercise or increase your physical activity?
				</div>
				<div class="clear"></div>
				<span><!--err:erq10--></span>
			</div>

<!--Anketa:end-->
			</div>
			<div class="clear"></div>
			
					<input type="submit" id="reg_submit" tabindex="60" value="Become a member" class="button orange" style="display:block; margin:20px auto; width:200px; font-size:20px;">
			

		</div>
</form>
<div class="clear"></div>
[reg_new_ok]
	<div class="news-item">
		<h2>CONGRATULATIONS!</h2>
		<p>
			To complete your sign-up, please proceed to your registered mailbox and follow the instructions in the received message.
		</p>
[OLD_reg_new_ok]
		
		<div style="width:40%; float:left; margin-right:5%;">
			<h3>Now you can start <span>become fit!</span></h3>
			<p>
			  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
			</p>
			<a href="/members" class="button orange" style="display: block; font-size: 20px; margin: 30px auto; width: 144px; ">Members zone</a>
		</div>
	</div>
[reg_unlocked]
	<h1>Congratulations!</h1>
	<p>
		You are now registered VmakeUfit member.
		To get your full profile, log and training plans activated and fully functional, fix your appointment to get your profile completed by using life help toolbar,
		or writing an <a href="mailto:mailbox@vmakeufit.com">email</a>.
	</p>
[reg_stilllocked]
  <h1>Error!</h1>
  <p>
		Used link is not valid or out of date.
		<a href="mailto:mailbox@vMakeUfit.com" class="btn">Contact us for help</a>
	</p>
  
[reg_was]
	<div class="news-item">
		<h2>Warning</h2>
		<p>You are registered user.</p>
	</div>
[pack]
	<div class="field f3">
		<p>
			Your training package:
		  <strong style="font-size:18px; color:#369;">{plan}</strong>
		</p>
		<div class="clear"></div>
	</div>
[tmp]
[pack_choice_comprehensive]
	<h2>Your choice is <span>Comprehensive package</span>.</h2>
	<p>
		It covers Examination, Risk stratification, Exercising group classification; Dietary advice; Exercise Counseling & Training program.
	</p>
[pack_choice_medium]
	<h2>Your choice is <span>Medium package</span>.</h2>
	<p>
		It covers Examination, Risk stratification, Exercising group classification; and Dietary advice.
	</p>
[pack_choice_light]
	<h2>Your choice is <span>Light package</span>.</h2>
	<p>
		It covers Examination, Risk stratification, Exercising group classification; <b>OR</b> Dietary advice.
	</p>